package com.woniuxy.controller;

import com.woniuxy.entity.Level;
import com.woniuxy.entity.ResponseEntity;
import com.woniuxy.service.LevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Level)表控制层
 *
 * @author makejava
 * @since 2021-02-23 14:27:24
 */
@RestController
@RequestMapping("level")
public class LevelController {
    /**
     * 服务对象
     */
    @Autowired
    private LevelService levelService;

    /**
     * Description : 查看所有等级代理和分润情况
     * ChangeLog : 1. 创建 (2021/2/23 14:52 GYF);
     *
     * @return java.util.List<com.woniuxy.entity.Level>
     **/
    @GetMapping("selectAll")
    public ResponseEntity selectAll() {
        return new ResponseEntity<List<Level>>(levelService.queryAll());

    }

}